<?php

class Controller extends Smarty
{
    public function __construct()
    {
        $this->setTemplateDir('./views')
            ->setCompileDir('./runtime/views_c')
            ->setConfigDir('./configs')
            ->setCacheDir('./runtime/caches');

        // 配置 模板变量的定界符   {{ }}   <{ }>   <!-- -->
        $this->left_delimiter = LEFT_D;
        $this->right_delimiter = RIGHT_D;

        // 配置 缓存控制 (开启缓存/缓存时间)
        $this->caching = CACHING; // 开启
        $this->cache_lifetime = CLT; // 缓存10s
    }
    public function __call($name, $arguments)
    {
        header('Http/1.0 404 not found');
        echo '<h1>404 NOT FOUND-基类</h1>';
        exit;
    }
}